package com.tian.service.impl;

import com.tian.client.ChargeRecordClient;
import com.tian.client.ChargingClient;
import com.tian.common.CommonResult;
import com.tian.dto.AppChargingStartReqDto;
import com.tian.dto.AppChargingStopReqDto;
import com.tian.dto.ChargeUserLoginResDto;
import com.tian.entity.ChargeRecord;
import com.tian.mapper.ChargeRecordMapper;
import com.tian.service.ChargingService;
import com.tian.util.UserCacheUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * {@code @description:} 充电服务实现类
 *
 * @author tianwc 公众号：Java后端技术全栈
 * 在线刷题 1200+java面试题和1000+篇技术文章：<a href="https://woaijava.cc/">博客地址</a>
 * {@code @date:} 2024-08-29 18:30
 * {@code @version:} 1.0
 */
@Slf4j
@Service
public class ChargingServiceImpl implements ChargingService {
//    @Resource
    private ChargingClient chargingClient;

    @Override
    public CommonResult<Boolean> startCharging(AppChargingStartReqDto appChargingStartReqDto) {
        /*CommonResult<Boolean> start = chargingClient.start(appChargingStartReqDto);
        if (start.getCode() == 200) {
            return CommonResult.success(true);
        }*/
        return CommonResult.failed();
    }

    @Override
    public CommonResult<Boolean> stopCharging(AppChargingStopReqDto appChargingStopReqDto) {
        /*CommonResult<Boolean> stop = chargingClient.stop(appChargingStopReqDto);
        if (stop.getCode() == 200) {
            return CommonResult.success(true);
        }*/
        return CommonResult.failed();
    }
}
